<%-- Pagina principal da aplicacao, a listagem de mercadorias. --%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<div>
	<div style="border-bottom: 1px solid #E5E5E5;">
		<h4>${disciplina.nome} - Alunos</h4>
		
	</div>
		
	<form action="salvar-vinculo" method="POST">
	
	<input type="hidden" name = "id" value = "${disciplina.id}"/>
	
	<table class="table table-hover">
		<thead>
			<tr>
				<th>Aluno</th>
			</tr>
		</thead>

		<c:forEach items="${vinculo}" var="aluno">
		<tr>		
		
			<td>${aluno.nomeAluno}</td>
			
			<td>	<input type="checkbox" name="aluno" value="<c:out value="${aluno.idAluno}"/>"<c:if test="${aluno.binded}">checked</c:if>/></td>
					
		</tr>
		</c:forEach>
	</table> 
	
	<input type="submit"  class="btn btn-success" value = "Salvar"/>
 	
 	</form>
</div>

